package com.yuyue.springFramework.note09.module1;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Service2 {
    //自动填充Service1
    @Autowired
    private Service1 service1;

    //调用Service1的方法
    public void method1(){
        service1.method1();
    }
}
